package com.baizhi.controller.product;

import com.baizhi.service.IPmsCategoryService;
import com.baizhi.vo.CascaderNodeVo;
import com.baizhi.vo.ZtreeNodeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("category")
public class PmsCategoryController {
    @Autowired
    private IPmsCategoryService categoryService;

    @GetMapping("getZTreeNodes")
    public List<ZtreeNodeVo> getZTreeNodes(){
        return categoryService.getZTreeNodes();
    }

    /**
     * 获取级联下拉数据
     */
    @GetMapping("getCascaderNodeVos")
    public List<CascaderNodeVo> getCascaderNodeVos(){
        return categoryService.getCascaderNodeVos();
    }
}
